package com.ychug.common.utils;


import java.io.File;

public class UploadFile {
    private String parameterName;
    private String uploadPath;
    private String fileName;
    private String originalFileName;
    private String contentType;

    public UploadFile(String parameterName, String uploadPath, String filesystemName, String originalFileName, String contentType) {
        this.parameterName = parameterName;
        this.uploadPath = uploadPath;
        this.fileName = filesystemName;
        this.originalFileName = originalFileName;
        this.contentType = contentType;
    }

    public String getParameterName() {
        return this.parameterName;
    }

    public String getFileName() {
        return this.fileName;
    }

    public String getOriginalFileName() {
        return this.originalFileName;
    }

    public String getContentType() {
        return this.contentType;
    }

    public String getUploadPath() {
        return this.uploadPath;
    }

    public File getFile() {
        return this.uploadPath != null && this.fileName != null ? new File(this.uploadPath + File.separator + this.fileName) : null;
    }
}
